<?php
///**
// * 注意：本内容仅限于博也公司内部传阅,禁止外泄以及用于其他的商业目的
// * @author    hebidu<346551990@qq.com>
// * @copyright 2018 www.itboye.com Boye Inc. All rights reserved.
// * @link      http://www.itboye.com/
// * @license   http://www.opensource.org/licenses/mit-license.php MIT License
// * Revision History Version
// ********1.0.0********************
// * file created @ 2018-03-26 11:42
// *********************************
// ********1.0.1********************
// *
// *********************************
// */
//
//namespace byTest\component\pahys\api;
//
//
//use by\component\pahys\api\TestApi;
//use by\component\pahys\context\DevContext;
//use by\component\pahys\helper\SignHelper;
//use by\component\pahys\helper\TripleDesHelper;
//use PHPUnit\Framework\TestCase;
//
//class EncryptTest extends TestCase
//{
//
//    public function testIndex()
//    {
//        $key = "600959f7120cf956fd0f6bb85f291b83";
//        $desKey = md5($key);
//        $desKey = $desKey . substr($desKey, 0, 16);
//        $desKey = pack("H48", $desKey);
//        $iv = pack("H16", "0000000000000000");
//        $str = '__o_s=c88399a45eb54ecc872972400d880200#OPENAPI_DUBBO_DEV&__o_v=0.1.0&arg1={"apiId":1,"apiName":"ApiInfo","dateTime":"2016-12-02 12:22:23","serialNum":2}&__o_r=297335.97035396';
//        $encryptStr = TripleDesHelper::encrypt($str, $desKey, $iv);
//        var_dump($encryptStr);
//        $hmac = $encryptStr.'297335.97035396';
//        $hmac = SignHelper::signHmac($hmac, $key);
//        var_dump($hmac);
////        $encryptStr = TripleDesHelper::decrypt($encryptStr, $desKey, '');
////        var_dump($encryptStr);
////        $encryptStr = TripleDesHelper::decryptOld($encryptStr, $desKey, $iv);
////        var_dump($encryptStr);
////        $encryptStr = TripleDesHelper::encrypt($str, $desKey, $iv);
////        var_dump($encryptStr);
//
//    }
//
//}